#!/bin/bash

if [[ -d /usr/share/fonts/wps ]]; then echo "fonts is installed"; exit 0; fi

SUDO="sudo "
if [[ $(id -u) -eq 0 ]]; then SUDO=""; fi

wget https://gitee.com/wyanlord/sh/releases/download/v1.0/wps_symbol_fonts.zip
unzip wps_symbol_fonts.zip -d wps
rm -f wps_symbol_fonts.zip

wget https://gitee.com/wyanlord/sh/releases/download/v1.0/NotoSansMono.tar.gz
tar zxvf NotoSansMono.tar.gz
rm -f NotoSansMono.tar.gz

$SUDO mv ./wps /usr/share/fonts
$SUDO mv ./NotoSansMono /usr/share/fonts
$SUDO fc-cache -f -v